<%--  index. jsp --%>
<%@page contentType="text/html;charset=UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
	<title>Web Baesd Intelligent Tutoring System in Sudoku for Logic Training</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <%-- CSS is get from http://www.freelayouts.com/ --%>
    <link rel="stylesheet" type="text/css" href="css/default.css" title="default"/>
</head>

<script>
function hide() {
    document.getElementById("login").style.display = "none";
    document.getElementById("logout").style.display = "block";
}
</script>

<body>
    <jsp:include page='header.jsp'/>

    <% String loginFormURL =
               "http://144.214.121.25:8080/SudokuITSWebsite/login.jsp";
    String user = (String) session.getAttribute("user");

    if(user == null) {
        response.setHeader("Refresh", "3; URL=" + loginFormURL);
        out.println(
            "<div class=\"article_body\">" +
            "<p><h2>" +
            "You have not login and will be redirected to the login page after 3 seconds. If not, press<a href=\"login.jsp\">here</a><br/>" +
            "您還沒登入！3秒後進入登入頁面.如沒有，請按<a href=\"login.jsp\">此</a><br/>" +
            "</h2></p>" +
            "</div>");
    }else{

    %>

        <div class="article_head">
            <div class="arrow"></div>
            <h1>Sudoku History</h1>
        </div>

        <div class="article_body">
            <p>
                <b>Sudoku</b>, which means single letter, is a widely known logic based
                number placement puzzle. It was first invented by an American architect,
                Howard Garns, in 1979 with original names “Number in Place”. It was popular
                since 1986 when the name “Sudoku” is given by the Japanese puzzle company Nikoli
                and became an international trend since 2005. Sudoku is grid of 9X9 cells in which
                each row, column and 3X3 box can only accommodate digits from 1 to 9 exactly once.
                The puzzle provides a partially complete grid to players as clues for solving the
                puzzle.According to the studies and researches conducted by Herzberg and Murty (2007),
                Sudoku is claimed to be an effective logical development tool.
            </p>
        </div>

    <%
        }
    %>

     <jsp:include page='footer.jsp'/>
</body>
</html>

